const globalData = {
  UserBaseInfo: {
    UserId: "666",
    Nickname: "小范范范",
    AvatarUrl:
      "https://img2.baidu.com/it/u=2015865969,3401990894&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1666630800&t=0e56d590792d305dab1d410186dab3aa",
    PhoneNumber: "13142211138",
  },
};

const utils = {
  setGD: function (key, value) {
    if (key === "" || key == null) {
      return;
    }
    globalData[key] = value;
  },

  getGD: function (key) {
    if (key === "" || key == null) {
      return;
    }
    return globalData[key];
  },

  timeStampToDate: function (timeStamp) {
    return new Date(timeStamp).toLocaleString();
  },
};

export default utils;
